<?php
/**
 *
 * @author ninetyseven.
 * @date 2023-03-28 21:48
 */

namespace App\Enum;

class DriverEnum
{
    /**
     * 司机待出行订单列表
     */
    public const R_DRIVER_WAIT_ORDER_LIST_KEY="driver_wait_order_%d";
    public const R_DRIVER_WAIT_ORDER_LIST_TTL = 300;
    /**
     * @int 司机状态-正常
     */
    public const DRIVER_STATUS_OK = 1;


    /**
     * @int 修改密码
     */
    public const MODIFY_TYPE = 1;

    /**
     * @int 忘记密码
     */
    public const FORGET_TYPE = 2;

    /**
     * @int 司机状态-接单中
     */
    public const DRIVER_STATUS_DRIVING = 3;

    /**
     * @int 司机状态-下线
     */
    public const DRIVER_STATUS_OFF = 2;

    public const ALLOW_ROUTE = [
        'api/v1/login',
        'api/v1/donation/wx/login',
        'api/v1/generate/token',
        'api/v1/wx/secrettoken',  //发布问题
        'api/v1/wx/secret',  //发布问题
        'api/v1/wx/login',
        'api/v1/driver/register',
        'api/v1/sms/code',
        'api/v1/driver/my/account/modify/password',
        'api/v1/qrcode/volunteer/info',
        'api/v1/qrcode/my/volunteer/info',
        'api/v1/get/time',
        'api/v1/jPush',
        'api/v1/qrcode/driver/info',
        'api/v1/qrcode/villager/info',
        'api/v1/qrcode/order/info',
        'api/v1/qrcode/order/ord',
        'api/v1/qrcode/activity/order/info',
        'api/v1/qrcode/activity/order/ord',
        'api/v1/notice'
    ];
    public const ALLOW_ROUTE_PATTERN = '/backend\/v.*/';

    /**
     * 司机状态
     */
    public const DRIVER_STATUS = [
      1 => '上班',
      2 => '下班',
      3 => '接单中',
      4 => '休息中',
    ];

}

